package com.fili.core;

import com.fili.gui.components.ActiveCell;
import com.fili.gui.components.Bevel;
import com.fili.gui.components.DisplayCell;

import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 * User: fili
 * Date: Sep 25, 2006
 * Time: 9:32:46 PM
 * To change this template use File | Settings | File Templates.
 */
public class UscatorViewISPM extends UscatorView
{
    private DisplayCell edSonda0;
    private DisplayCell edSonda1;
    private DisplayCell edSonda2;
    private DisplayCell edSonda3;
    private DisplayCell edSonda4;
    private DisplayCell edSonda5;
    private DisplayCell edSonda6;
    private DisplayCell edSonda7;
    private DisplayCell edMedieAer;
    private DisplayCell edMedieLemn;
    private DisplayCell edUmidAer;
    private DisplayCell edTempDorita;
    private ActiveCell edVentilator;
    private ActiveCell edIncalzire;

    public UscatorViewISPM(UscatorData data)
    {
        super(data);

        setSize(237, 286);
        setPreferredSize(new Dimension(237, 286));
        setLayout(null);

        JLabel lbl = new JLabel("Sonda 1");
        lbl.setBounds(7, 51, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 2");
        lbl.setBounds(135, 51, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 1");
        lbl.setBounds(7, 99, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 2");
        lbl.setBounds(135, 99, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 3");
        lbl.setBounds(7, 123, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 4");
        lbl.setBounds(135, 123, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 5");
        lbl.setBounds(7, 147, 52, 13);
        add(lbl);

        lbl = new JLabel("Sonda 6");
        lbl.setBounds(135, 147, 52, 13);
        add(lbl);

        lbl = new JLabel("Medie aer");
        lbl.setBounds(7, 195, 68, 13);
        add(lbl);

        lbl = new JLabel("Medie lemn");
        lbl.setBounds(7, 219, 68, 13);
        add(lbl);

        lbl = new JLabel("Umid. aer");
        lbl.setBounds(119, 195, 68, 13);
        add(lbl);

        lbl = new JLabel("Temp. dorita");
        lbl.setBounds(119, 219, 68, 13);
        add(lbl);

        lbl = new JLabel("Ventilare");
        lbl.setBounds(7, 259, 68, 13);
        add(lbl);

        lbl = new JLabel("Incalzire");
        lbl.setBounds(119, 259, 68, 13);
        add(lbl);

        lbl = new JLabel("Sonde aer:");
        lbl.setBounds(7, 31, 68, 13);
        add(lbl);

        Bevel bvl = new Bevel();
        bvl.setBounds(66, 38, 161, 2);
        add(bvl);

        lbl = new JLabel("Sonde lemn:");
        lbl.setBounds(7, 80, 59, 13);
        add(lbl);

        bvl = new Bevel();
        bvl.setBounds(74, 87, 153, 2);
        add(bvl);

        lbl = new JLabel("Medii:");
        lbl.setBounds(7, 175, 36, 13);
        add(lbl);

        bvl = new Bevel();
        bvl.setBounds(42, 182, 185, 2);
        add(bvl);

        lbl = new JLabel("Uscator "+data.getID());
        lbl.setBounds(10, 8, 215, 13);
        lbl.setFont(lbl.getFont().deriveFont(Font.BOLD));
        lbl.setHorizontalAlignment(JLabel.CENTER);
        add(lbl);

        edSonda0 = new DisplayCell(-1);
        edSonda0.setBounds(66, 48, 41, 21);
        add(edSonda0);

        edSonda1 = new DisplayCell(-1);
        edSonda1.setBounds(186, 48, 41, 21);
        add(edSonda1);

        edSonda2 = new DisplayCell(-1);
        edSonda2.setBounds(66, 96, 41, 21);
        add(edSonda2);

        edSonda3 = new DisplayCell(-1);
        edSonda3.setBounds(186, 96, 41, 21);
        add(edSonda3);

        edSonda4 = new DisplayCell(-1);
        edSonda4.setBounds(66, 120, 41, 21);
        add(edSonda4);

        edSonda5 = new DisplayCell(-1);
        edSonda5.setBounds(186, 120, 41, 21);
        add(edSonda5);

        edSonda6 = new DisplayCell(-1);
        edSonda6.setBounds(66, 144, 41, 21);
        add(edSonda6);

        edSonda7 = new DisplayCell(-1);
        edSonda7.setBounds(186, 144, 41, 21);
        add(edSonda7);

        edMedieAer = new DisplayCell(-1);
        edMedieAer.setBounds(66, 192, 41, 21);
        add(edMedieAer);

        edMedieLemn = new DisplayCell(-1);
        edMedieLemn.setBounds(66, 216, 41, 21);
        add(edMedieLemn);

        edUmidAer = new DisplayCell(-1);
        edUmidAer.setBounds(186, 192, 41, 21);
        add(edUmidAer);

        edTempDorita = new DisplayCell(-1);
        edTempDorita.setBounds(186, 216, 41, 21);
        add(edTempDorita);

        edVentilator = new ActiveCell("Pornit");
        edVentilator.setBounds(66, 256, 41, 21);
        add(edVentilator);

        edIncalzire = new ActiveCell("Oprit", false);
        edIncalzire.setBounds(186, 256, 41, 21);
        add(edIncalzire);
    }

}
